.ai-chat-container {
  padding: 20px;
  min-height: calc(100vh - 140px);
  background: #f0f2f5;
}

.chat-card {
  height: 650px;
  display: flex;
  flex-direction: column;
}

.chat-card .ant-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  margin-bottom: 16px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fafafa;
  max-height: 450px;
}

.message-wrapper {
  margin-bottom: 16px;
  padding: 0 12px;
  animation: fadeIn 0.3s ease-in;
}

.message-wrapper:last-child {
  margin-bottom: 8px;
}

.message-content {
  display: flex;
  align-items: flex-start;
}

.user-message {
  justify-content: flex-end;
}

.user-message .message-content {
  flex-direction: row-reverse;
}

.user-message .ant-avatar {
  margin-right: 0;
  margin-left: 8px;
}

.ai-message .message-content {
  justify-content: flex-start;
}

.message-text {
  max-width: 70%;
  display: flex;
  flex-direction: column;
}

.message-body {
  background: white;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  word-wrap: break-word;
  line-height: 1.6;
  font-size: 14px;
}

.user-message .message-body {
  background: #1890ff;
  color: white;
  border-bottom-right-radius: 4px;
}

.ai-message .message-body {
  background: white;
  color: #333;
  border-bottom-left-radius: 4px;
  border: 1px solid #e8e8e8;
}

.message-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.user-message .message-meta {
  justify-content: flex-end;
}

.ai-message .message-meta {
  justify-content: flex-start;
}

.input-area {
  border-top: 1px solid #e8e8e8;
  padding-top: 16px;
}

.input-area .ant-input {
  border-radius: 8px 0 0 8px;
}

.input-area .ant-btn {
  border-radius: 0 8px 8px 0;
  height: auto;
}

.suggestions-card .suggestion-item {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.suggestions-card .suggestion-item:hover {
  background: #f0f7ff;
  color: #1890ff;
  transform: translateX(4px);
}

.suggestions-card .suggestion-item:last-child {
  margin-bottom: 0;
}

.help-content {
  font-size: 12px;
  line-height: 1.5;
}

.help-content ul {
  margin: 8px 0;
  padding-left: 16px;
}

.help-content li {
  margin-bottom: 4px;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 滚动条样式 */
.messages-container::-webkit-scrollbar {
  width: 6px;
}

.messages-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* DeepSeek头像特殊样式 */
.deepseek-avatar {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
  border: 2px solid #e0e7ff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  transition: all 0.3s ease;
}

.deepseek-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .ai-chat-container {
    padding: 12px;
  }
  
  .chat-card {
    height: 500px;
  }
  
  .messages-container {
    max-height: 300px;
  }
  
  .message-text {
    max-width: 85%;
  }
  
  .message-body {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .suggestions-card {
    margin-top: 12px;
  }
}

/* 加载状态 */
.loading-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f9f9f9;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
}

/* 错误状态 */
.error-message .message-body {
  background: #fff2f0;
  border-color: #ffccc7;
  color: #a8071a;
}

/* 标签样式优化 */
.message-meta .ant-tag {
  margin: 0 2px;
  font-size: 10px;
  line-height: 1;
  padding: 1px 4px;
  border-radius: 2px;
}

/* 卡片标题样式 */
.ant-card-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 建议列表样式 */
.suggestions-card .ant-list-item {
  border: none;
  padding: 0;
}

.suggestions-card .ant-list-item-meta {
  margin-bottom: 0;
}

/* 输入框焦点状态 */
.input-area .ant-input:focus,
.input-area .ant-input-focused {
  border-color: #40a9ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 状态标签 */
.status-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Markdown 样式 */
.message-body h1,
.message-body h2,
.message-body h3,
.message-body h4,
.message-body h5,
.message-body h6 {
  margin: 16px 0 8px 0;
  font-weight: 600;
  line-height: 1.25;
}

.message-body h1 {
  font-size: 1.5em;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 8px;
}

.message-body h2 {
  font-size: 1.25em;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 6px;
}

.message-body h3 {
  font-size: 1.1em;
}

.message-body p {
  margin: 8px 0;
  line-height: 1.6;
}

.message-body ul,
.message-body ol {
  margin: 8px 0;
  padding-left: 20px;
}

.message-body li {
  margin: 4px 0;
  line-height: 1.5;
}

.message-body blockquote {
  margin: 16px 0;
  padding: 8px 16px;
  border-left: 4px solid #dfe2e5;
  background-color: #f6f8fa;
  color: #6a737d;
}

.message-body code.inline-code {
  background-color: rgba(27, 31, 35, 0.05);
  border-radius: 3px;
  font-size: 85%;
  margin: 0;
  padding: 0.2em 0.4em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.message-body pre {
  background-color: #f6f8fa;
  border-radius: 6px;
  font-size: 85%;
  line-height: 1.45;
  overflow: auto;
  padding: 16px;
  margin: 16px 0;
}

.message-body pre code {
  background-color: transparent;
  border: 0;
  display: inline;
  line-height: inherit;
  margin: 0;
  max-width: auto;
  overflow: visible;
  padding: 0;
  word-wrap: normal;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.message-body .markdown-table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
  margin: 16px 0;
}

.message-body .markdown-table th,
.message-body .markdown-table td {
  border: 1px solid #dfe2e5;
  padding: 6px 13px;
  text-align: left;
}

.message-body .markdown-table th {
  background-color: #f6f8fa;
  font-weight: 600;
}

.message-body .markdown-table tr:nth-child(2n) {
  background-color: #f6f8fa;
}

.message-body a {
  color: #0366d6;
  text-decoration: none;
}

.message-body a:hover {
  text-decoration: underline;
}

.message-body hr {
  border: none;
  border-top: 1px solid #eaecef;
  margin: 24px 0;
}

.message-body strong {
  font-weight: 600;
}

.message-body em {
  font-style: italic;
} 